/*
 * Copyright (c) 2006-2021, RT-Thread Development Team
 *
 * SPDX-License-Identifier: Apache-2.0
 *
 * Change Logs:
 * Date           Author       Notes
 * 2022-05-17     fanlulin       the first version
 */
//K210连接中智云平台


#include "wifi.h"
static rt_thread_t wifi = RT_NULL;

static void wifi_entry(void *parameter)
{
    rt_wlan_connect("fanlulin","123456789");
}


int wifi_thread(void){
    wifi= rt_thread_create("wifi",
                            wifi_entry, RT_NULL,
                            THREAD_STACK_SIZE,
                            THREAD_PRIORITY, THREAD_TIMESLICE);
    if (wifi != RT_NULL){
        rt_thread_startup(wifi);
        rt_kprintf("wifi thread start successfully\r\n");
    }

    else{
        rt_kprintf("wifi thread start failed\r\n");
    }
    return 0;



}

